package com.huoshan.im.server.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 说明：作者很懒，什么都没留下
 * Created by 火山九日 on 2020-04-26 10:20
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "setting")
public class SettingConfig {

    private Boolean cache;
    private String jwtKey;
    private String sysKey;
    private String repeaterServiceName;
    private String feishuWebhook;

    private Server server;
    private Kafka kafka;

    private ExecutorThreadConfig executorConfig;

    @Data
    public static class Server {
        private String type;
        private String host;
        private int port;
        private int core;
        private int maxConnections;
        private int timeoutSeconds;
        private WebSocket webSocket;
    }

    @Data
    public static class WebSocket {
        private int port;
        private String path;
        private int maxConnections;
    }

    @Data
    public static class Kafka {
        private String unSendTopic;
        private String sendTopic;
        private String roomStatusUpdateTopic;
        private String roomAnchorBlockTopic;
        private String roomAnchorSettingTopic;
        private String roomOperateTopic;
        private String seatUpdateTopic;
    }


    @Data
    public static class ExecutorThreadConfig {
        private Integer corePoolSize;
        private Integer maxPoolSize;
        private Integer queueCapacity;
        private Integer keepAliveSeconds;
        private String threadNamePrefix;
    }

}
